//echarts图标数据
const router = require('koa-router')()
const Echarts = require('../model/echartsSchema.js')
const utils = require('../utils/utils.js')
//设置路由前缀
router.prefix('/echarts')


//echarts图标数据
router.get('/list', async (ctx) => {
    try {
        // let params = {}
        let res = await Echarts.find({})//查询所有
        ctx.body = utils.success(res)
    } catch (error) {
        console.log(error);
    }
})


module.exports = router
